Back to networking

Pipeline, November/December 1995, vol.6, no.6
Copyright © 1995 Silicon Graphics


IRIX 5.3 NFS Version 3

This article provides an overview of the NFS (Network File System)
Version 3 protocol and compares it to the NFS Version 2 protocol. Key
differences between the IRIX 5.3 implementation of the NFS Version 3
protocol are emphasized.

It is assumed that the reader is a network administrator familiar with NFS, NIS (Network Information Services), TCP/IP, and automount(1M).

IRIX 5.3 ONC3/NFS

The NFS Version 3 protocol was first implemented in IRIX 5.3 ONC3/NFS (Open Network Computing/Network File System). ONC3/NFS is a suite of distributed services adapted from Sun Microsystems' ONC+ version 1.2.

ONC3/NFS provides additional features over previous releases of NFS available with IRIX and includes the NFS Version 3 protocol and CacheFS. The NFS Version 3 protocol is a revision of the existing NFS Version 2 protocol. CacheFS is a new file system caching mechanism designed for frequently read data. For more information about CacheFS, refer to the ONC3/NFS Administrator's Guide, available on-line with InSight(1).

NFS Version 3 and CacheFS, along with other enhancements such as aggressive read ahead and multi-threaded processing, provide capabilities that can improve NFS performance.

By default, a server running IRIX 5.3 and NFS will reply to both Version 2 and 3 protocol requests transparently. Both NFS Version 2 and 3 are available over UDP only.

A client running IRIX 5.3 and NFS is only Version 2 by default. Installation of the subsystem nfs3.sw.nfs3 using inst(1M) is required to enable NFS Version 3 on an IRIX NFS client. Once the NFS Version 3 software is installed, the client can use either NFS Version 2 or Version 3.

The mount(1M) command has two additional file system types that use NFS Version 3 protocol: nfs3 and nfs3pref. Mounting a file system as nfs3 requests the server to respond using the Version 3 protocol. If Version 3 is not available from the server, the mount request will fail. The nfs3pref file system type allows the client to request NFS Version 3 from the server, but if NFS Version 3 is unavailable, the client will resort to Version 2. For more information on the options nfs3 or nfs3pref, refer to the ONC3/NFS Administrator's Guide.

Examples

To request a NFS Version 3 mount, but accept a NFS Version 2 mount if Version 3 is unavailable, use a command similar to the following:

# mount -t nfs3pref <server>:/<dir> /<mountpoint>
To request only a NFS Version 3 mount, use a command similar to the following. Note that the mount will fail if NFS Version 3 is unavailable.
# mount -t nfs3 <server>:/<dir> /<mountpoint>
It is also possible to specify the version of NFS in automount maps. To make an entire automount map use NFS Version 3, include the option nfs3 in the master map (/etc/auto.master):
/net /etc/auto.mapname -rw,hard,nfs3
Requests for NFS Version 3 may also be included in direct or indirect maps. For example, in an indirect map, the nfs3 option may be specified as:
<directory> -intr,nfs3 <server>:/<directory>
Automount does not support the nfs3pref option. Refer to the ONC3/NFS Administrator's Guide for further information.

Patches

Due to problems discovered in NFS Version 3 after the release of IRIX 5.3, patch 547 is highly recommended for servers and clients running NFS Version 3 under IRIX 5.3.

Customers should contact their support provider to determine the availability of patches. For more information on patches, refer to the article titled "Software Patches" in the July/August 1995 issue of Pipeline (available on-line with InSight if Support Advantage is loaded).

NFS Version 3 Protocol Specification

The NFS Version 3 protocol evolved from the NFS Version 2 protocol. The revised protocol provides a similar model for network file systems and maintains the stateless server design and crash recovery method available under NFS Version 2.

The following problems were primarily responsible for the revision of the NFS Version 2 protocol:

To address the problems listed above, while keeping the revision simple and compatible, the following key changes were introduced in the NFS Version 3 protocol. This list is taken from the NFS Version 3 protocol specification and not all of these changes are supported in IRIX. Refer to the section titled "IRIX 5.3 NFS Version 3 Implementation" for information specific to IRIX.

In addition to the changes listed above, NFS Version 3 provides the potential for smarter clients through better techniques in cache management. NFS Version 3 presents the idea of weak cache consistency data to allow the client to manage its cache more effectively.

Overall, 64-bit file addressing allows NFS Version 3 to transfer files larger than 4GB over a network. In addition, new RPC procedures, along with more effective techniques in client cache management, improve performance by minimizing network traffic and server loading. Larger data transfer sizes and asynchronous writes also provide a means for potential gains in throughput.

For further information about the NFS Version 3 protocol and the RPC procedures listed above, refer to the Network File System Version 3 Protocol Specification, RFC 1813.

IRIX 5.3 NFS Version 3 Implementation

The changes listed in the preceding section are from the NFS Version 3 protocol specification. However, the IRIX 5.3 implementation of the NFS Version 3 protocol has two primary differences as compared to the actual specification.

Clients Write Synchronously Only

The NFS Version 3 protocol requires that modified data on the server be safely stored on a non-volatile medium before sending a positive reply to the client. The only exceptions are asynchronous writes.

Asynchronous writes are optional in NFS Version 3. If implemented, a client can send many WRITE requests followed by a single COMMIT to flush the entire file to disk when closing the file. Asynchronous writes as defined in NFS Version 3 are most effective for large files.

Currently, an IRIX NFS Version 3 client only has synchronous write capabilities. A mount option is being considered for a future release to enable asynchronous writes on an IRIX NFS Version 3 client.

In current (and previous) IRIX releases, delayed writes provide an alternate strategy to improve NFS Version 2 write performance. Delayed writes are the default for an IRIX NFS Version 2 server and may be disabled by using the exports(4) wsync option. When delayed writes are enabled, the server delays the write and immediately responds to the client with a write acknowledgment.

Delayed writes are strictly a feature for IRIX NFS Version 2 servers. For NFS Version 3 clients, the status of the IRIX server's wsync export option has no effect. All NFS Version 3 writes are performed synchronously and are not delayed, independent of the wsync export option.

Data Transfer Size is Limited to 8KB

To utilize data transfer sizes greater than 8KB, a reliable transport protocol is considered to be a necessary requirement for the IRIX NFS Version 3 client.

Data transfer size for NFS is essentially the buffer size or amount of data that NFS can reliably send between two systems in a single transaction. If the underlying protocols and physical medium are unreliable and data is lost, NFS resends the entire transaction.

Since IRIX NFS Version 2 and Version 3 are currently supported only over UDP, the data transfer size limit has not been increased to 64KB. Implementation of NFS over TCP will provide the needed reliable transport protocol to effectively support 64KB transfer sizes.

References

The following documents can provide additional information on NFS and NFS Version 3. On-line copies of RFCs are available via anonymous FTP from the InterNIC Directory and Database Services server, ds.internic.net. RFCs are located in the directory /rfc and are provided as PostScript or ASCII files. In the following list, the presence or absence of any particular reference should not be construed as a comment on its usefulness.

ONC3/NFS Administrator's Guide, (SGI Document Number: 007-850-070), available on-line with InSight.

Network File System Version 3 Protocol Specification, RFC 1813 B. Callaghan, B. Pawlowski, P. Staubach, Sun Microsystems, Inc., June 1995

TCP/IP and ONC/NFS, Internetworking in a Unix Environment, Michael Santifaller, Addison-Wesley, 1994 ISBN 0-201-42275-1

Managing NFS and NIS, Hal Stern, O'Reilly & Associates, Inc. 1991 ISBN 0-937175-75-7